package com.xujl.mvcbind.ui.list.model;

import com.xujl.fastlib.base.BaseModel;
import com.xujl.fastlib.base.IControl;
import com.xujl.mvcbind.ui.list.control.GridListFragmentControl;
import com.xujl.mvcbind.ui.list.control.ListFragmentControl;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import androidx.fragment.app.Fragment;


/**
 * <pre>
 *     author : xujl
 *     e-mail : 597355068@qq.com
 *     time   : 2019/08/20
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class TabListFragmentModel extends BaseModel {
    private List<Fragment> mFragmentList = new ArrayList<>();

    @Override
    public void init (IControl control) {
        mFragmentList.add(ListFragmentControl.newInstance());
        mFragmentList.add(GridListFragmentControl.newInstance());
        mFragmentList.add(ListFragmentControl.newInstance());
        mFragmentList.add(GridListFragmentControl.newInstance());
    }

    public List<String> getTitleList () {
        return Arrays.asList("种类1", "种类2", "种类3", "种类4");
    }

    public List<Fragment> getFragmentList () {
        return mFragmentList;
    }
}
